home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Tools & Apps / Networking & Communications / Serial NB Sample Driver / inc / ARTask.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-11-15  |  3.9 KB  |  130 lines  |  [TEXT/MPS ]

  1. /********************************************************************************/
  2. /*                                                                                */
  3. /*        ARTask.h - Serial NB task definitions.                                    */
  4. /*                                                                                */
  5. /*        Richard W. Mincher.        February 20, 1990.                                */
  6. /*                                                                                */
  7. /*        Copyright © 1990, Apple Computer, Inc.  All rights reserved.            */
  8. /*                                                                                */
  9. /********************************************************************************/
  10.  
  11. #define    SNBCLOCK    7372800                        /*    Serial NB Clock    Freq (Hz)    */
  12.  
  13. #define    SCC_C1A        (unsigned char *)0x500005    /*    SCC #1 Channel A Control    */
  14. #define    SCC_D1A        (unsigned char *)0x500007    /*    SCC #1 Channel A Data        */
  15.  
  16. #define    SCC_C1B        (unsigned char *)0x500001    /*    SCC #1 Channel B Control    */
  17. #define    SCC_D1B        (unsigned char *)0x500003    /*    SCC #1 Channel B Data        */
  18.  
  19. #define    SCC_C2A        (unsigned char *)0x400005    /*    SCC #2 Channel A Control    */
  20. #define    SCC_D2A        (unsigned char *)0x400007    /*    SCC #2 Channel A Data        */
  21.  
  22. #define    SCC_C2B        (unsigned char *)0x400001    /*    SCC #2 Channel B Control    */
  23. #define    SCC_D2B        (unsigned char *)0x400003    /*    SCC #2 Channel B Data        */
  24.  
  25. #define    VS_1A_TBE    (unsigned long *)0x120        /*    Vector SCC #1 Channel A TBE    */
  26. #define    VS_1A_ESC    (unsigned long *)0x128        /*    Vector SCC #1 Channel A ESC    */
  27. #define    VS_1A_RCA    (unsigned long *)0x130        /*    Vector SCC #1 Channel A RCA    */
  28. #define    VS_1A_SRC    (unsigned long *)0x138        /*    Vector SCC #1 Channel A SRC    */
  29.  
  30. #define    VS_1B_TBE    (unsigned long *)0x100        /*    Vector SCC #1 Channel A TBE    */
  31. #define    VS_1B_ESC    (unsigned long *)0x108        /*    Vector SCC #1 Channel A ESC    */
  32. #define    VS_1B_RCA    (unsigned long *)0x110        /*    Vector SCC #1 Channel A RCA    */
  33. #define    VS_1B_SRC    (unsigned long *)0x118        /*    Vector SCC #1 Channel A SRC    */
  34.  
  35. #define    VS_2A_TBE    (unsigned long *)0x160        /*    Vector SCC #1 Channel A TBE    */
  36. #define    VS_2A_ESC    (unsigned long *)0x168        /*    Vector SCC #1 Channel A ESC    */
  37. #define    VS_2A_RCA    (unsigned long *)0x170        /*    Vector SCC #1 Channel A RCA    */
  38. #define    VS_2A_SRC    (unsigned long *)0x178        /*    Vector SCC #1 Channel A SRC    */
  39.  
  40. #define    VS_2B_TBE    (unsigned long *)0x140        /*    Vector SCC #1 Channel A TBE    */
  41. #define    VS_2B_ESC    (unsigned long *)0x148        /*    Vector SCC #1 Channel A ESC    */
  42. #define    VS_2B_RCA    (unsigned long *)0x150        /*    Vector SCC #1 Channel A RCA    */
  43. #define    VS_2B_SRC    (unsigned long *)0x158        /*    Vector SCC #1 Channel A SRC    */
  44.  
  45. #define    SIZETX        2000                        /*    Size of transmit buffer        */
  46.  
  47. #define    SIZERX        2000                        /*    Size of receive buffer        */
  48. #define    RXSTOP        200                        /*    When to turn on flow ctl.    */
  49. #define    RXSTART        250                        /*    When to turn on flow ctl.    */
  50.  
  51. #define    TICKLESIZE    100                            /*    Tx/Rx Tickle size            */
  52.  
  53.  
  54. struct    globals
  55. {
  56.     tid_type        myTid;
  57.     tid_type        hisTid;
  58.     unsigned short    sRxCount;
  59.     unsigned short    sTxCount;
  60.  
  61.     unsigned char    *txFirst;
  62.     unsigned char    *txOut;
  63.     unsigned char    *txIn;
  64.     unsigned char    *txLast;
  65.     AROSEmessage    *txQHead;
  66.     AROSEmessage    *txQTail;
  67.     AROSEmessage    *txSignal;
  68.     short            txCount;
  69.     short            txTickle;
  70.     short            txMax;
  71.  
  72.     unsigned char    *rxFirst;
  73.     unsigned char    *rxOut;
  74.     unsigned char    *rxIn;
  75.     unsigned char    *rxLast;
  76.     AROSEmessage    *rxQHead;
  77.     AROSEmessage    *rxQTail;
  78.     AROSEmessage    *rxSignal;
  79.     short            rxCount;
  80.     short            rxTickle;
  81.     short            rxMax;
  82.  
  83.     long            tbeCount;
  84.     long            escCount;
  85.     long            rcaCount;
  86.     long            srcCount;
  87.  
  88.     unsigned char    peChar;
  89.     unsigned char    altChar;
  90.     unsigned char    asyncErr;
  91.     unsigned char    flowOff;
  92.     unsigned char    readCmd;
  93.     unsigned char    writeCmd;
  94.     unsigned char    CTSFlag;
  95.     unsigned char    xOffFlag;
  96.     unsigned char    ctlOptions;
  97.     unsigned char    swhs;
  98.     unsigned char    hwhs;
  99.     unsigned char    sendXOnff;
  100.     unsigned char    charMask;
  101.     unsigned char    xOnChar;
  102.     unsigned char    xOffChar;
  103.     unsigned char    options;
  104.     unsigned char    postOptions;
  105.     unsigned char    inSwHs;
  106.     unsigned char    inHwHs;
  107.     unsigned char    prevStat;
  108.     unsigned char    moreTx;
  109.  
  110.     unsigned char    lastWR3;
  111.     unsigned char    lastWR4;
  112.     unsigned char    lastWR5;
  113.     unsigned char    baudHigh;
  114.     unsigned char    baudLow;
  115. };
  116.  
  117. #ifdef    MAIN && MCP
  118. #define    extern
  119. #endif    MAIN & MCP
  120.  
  121. #ifdef    MCP
  122. extern    message            *msg;
  123. extern    short            open;
  124. extern    short            reply;
  125. #endif
  126.  
  127. #ifdef    MAIN && MCP
  128. #undef    extern
  129. #endif
  130.